import pygame
import sys

# 初始化Pygame
pygame.init()

# 定义窗口的宽和高
WIDTH, HEIGHT = 800, 600
# 创建游戏窗口
screen = pygame.display.set_mode((WIDTH, HEIGHT))
# 定义背景颜色 (RGB)
BACKGROUND_COLOR = (255, 255, 255)  # 白色

# 定义哪吒的颜色
SKIN_COLOR = (255, 220, 185)
RED_COLOR = (255, 0, 0)
BLACK_COLOR = (0, 0, 0)

# 绘制哪吒的头部
def draw_head(screen):
    pygame.draw.circle(screen, SKIN_COLOR, (400, 200), 100)

# 绘制哪吒的眼睛
def draw_eyes(screen):
    pygame.draw.ellipse(screen, WHITE_COLOR, (350, 150, 30, 20))  # 左眼白
    pygame.draw.ellipse(screen, WHITE_COLOR, (420, 150, 30, 20))  # 右眼白
    pygame.draw.circle(screen, BLACK_COLOR, (365, 160), 10)  # 左眼瞳孔
    pygame.draw.circle(screen, BLACK_COLOR, (435, 160), 10)  # 右眼瞳孔

# 绘制哪吒的嘴巴
def draw_mouth(screen):
    pygame.draw.rect(screen, RED_COLOR, (350, 185, 100, 20))

# 绘制哪吒的混天绫
def draw_huntianling(screen):
    # 简单绘制一条红色弧线作为混天绫示意
    pygame.draw.arc(screen, RED_COLOR, (200, 250, 400, 100), 0, 3.14, 5)

# 主循环
while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()
            sys.exit()
    screen.fill(BACKGROUND_COLOR)
    draw_head(screen)
    draw_eyes(screen)
    draw_mouth(screen)
    draw_huntianling(screen)
    pygame.display.flip()
